Programming
8.1 Programming concepts
Candidates should be able to:
Declare and use variables and constants
Understand and use the basic data types
Note and guidance
- Including:
- integer
- real
- char
- string
- Boolean
- Understand and use input and output
Note and guidance
- Understand and use the concept of sequence
- Understand and use the concept of selection
- Understand and use the concept of iteration
- Understand and use the concepts of totalling and counting
- Understand and use the concept of string handling
- Understand and use arithmetic, logical and Boolean operators
Note and guidance
- Including:
- IF statements
- CASE statements
- Including:
- count-controlled loops
- pre-condition loops
- post-condition loops
- Including:
- length
- substring
- upper
- lower
- The first character of the string can be position zero or one
- Arithmetic, limited to:
- +
- –
- /
- *
- ^ (raised to power of)
- MOD
- DIV
- Logical, limited to:
- =
- <
- <=
- >
- >=
- <> (not equal to)
- Boolean, limited to:
- AND
- OR
- NOT
- Understand and use nested statements
Note and guidance
- Including nested selection and iteration
- Candidates will not be required to write more than three levels of nested statements
- Understand what is meant by procedures, functions and parameters
- Define and use procedures and functions, with or without parameters
- Understand and use local and global variables
Note and guidance
- Procedures and functions may have up to two parameters
- Understand and use library routines
Note and guidance
- Including:
- MOD
- DIV
- ROUND
- RANDOM
- Understand how to create a maintainable program
Note and guidance
- Including appropriate use of:
- meaningful identifiers
- the commenting feature provided by the programming language
- procedures and functions
- relevant and appropriate commenting of syntax
- Use meaningful identifiers for:
- variables
- constants
- arrays
- procedures and functions
8.2 Arrays
Candidates should be able to:
Declare and use one-dimensional (1D) and two-dimensional (2D) arrays
Understand the use of arrays
Note and guidance
- Including the use of variables as indexes in arrays
- The first index can be zero or one
- Write values into and read values from an array using iteration
Note and guidance
- Including nested iteration
8.3 File handling
Candidates should be able to:
Understand the purpose of storing data in a file to be used by a program
Open, close and use a file for reading and writing
Note and guidance
- Including:
- read and write single items of data
- read and write a line of text